package pl.edu.pk.mech.kkbus.model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

public class ContactMessage {

    @NotNull
    @Pattern(regexp=".+@.+\\.[a-z]+")
    private String to;
    @NotNull
    @Size(min = 5, max = 50)
    private String subject;
    @NotNull
    @Size(min = 5, max = 200)
    private String message;

    public ContactMessage() {}
    
    public ContactMessage(String to, String subject, String message) {
        this.to = to;
        this.subject = subject;
        this.message = message;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    
}
